package com.yohann.designPattern.prototype.shallowCopy;

import com.yohann.designPattern.prototype.clone.Sheep;

/**
 * <p>
 * 克隆羊（浅拷贝）
 * </p>
 *
 * @author Yohann
 * @since 2021/2/2 15:38
 */
public class Sheep2 extends Sheep {
    //添加引用类型属性
    Sheep friend;

    public Sheep2(String name, String color) {
        super(name, color);
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }
}